<%@ page language="java" %>
<%@ page session="true" %>
<%@ page import="java.sql.*,java.io.*,java.util.Random"%>

<HEAD>


	<script LANGUAGE="Javascript" SRC="Images/validate.js"></script>


	<LINK href="styles.css" type="text/css" rel="stylesheet">
<SCRIPT LANGUAGE="JavaScript">
	<!--
		function fnShowDetails(userid,U)
			{
				var URL = U+"?userid="+userid;
				fnEmpPopUp(URL,600,600);
			}
	//-->
	</SCRIPT>
</HEAD>
<BODY class=Grad>

<h2 align=center>View Jobseekers</h2>

<%
int IAuth;
IAuth=(session.getAttribute("auth")==null) ? 10 :(Integer)session.getAttribute("auth");
if(IAuth==0||IAuth==1||IAuth==2){
	Connection con=null;
	ResultSet rs=null;
	Statement stmt=null;
	try{
			
			/* Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
			con = DriverManager.getConnection("jdbc:odbc:jobportal","root",""); */


			Class.forName("com.mysql.jdbc.Driver");
			con = DriverManager.getConnection("jdbc:mysql://localhost:3306/jobmiller","root","root");

			stmt =  con.createStatement();
			String Query = "Select * from educationaldetails";
		
			System.out.println(" Query:"+Query);
			
			rs = stmt.executeQuery(Query);
			
			
			
			%>
						<table align="center" width="60%">
							<tr class=row_title>
								<th align="Center" colspan=4>Jobseekers Details</th>
							</tr>
			<%
			int rCount=0;
			
                
		while(rs.next())
			{
									 String	userid	=rs.getString(2);

					 String	BasicQualification	=rs.getString(3);
						String	PercentageBQ	=rs.getString(4);
						String	PostGraduation	=rs.getString(7);
						String	Percentage		=rs.getString(8);
			%>
						<TR class= "row_odd">
							<th align="left">Jobseeker Id</th> 
							<th align=center><A onclick="fnShowDetails('<%=userid%>','ShowJobseekers.jsp')"><B>&lt;&lt;<%=userid%>&gt;&gt;</B></th>
							<td align="left" colspan=2><I><FONT SIZE="-1" COLOR="brown" face="Times new roman">click on User Id to view more details </FONT></I></td> 
						</TR>
						<TR class= "row_even">
							<th align="left">BasicQualification</th> <td><%=BasicQualification%></td><th align="left">Percentage</th> <td><%=PercentageBQ%></td>
						</TR>
						<TR class= "row_even">
							<th align="left">PostGraduation</th> <td><%=PostGraduation%></td><th align="left">Percentage</th><td><%=Percentage%></td>
						</TR>
						
						<TR class= "row_even">
							<th align="center" colspan=4><HR color="#FF0099"></th>
						</TR>
					<%
				rCount++;
			}
			
			if( rCount == 0)	{%><tr class="row_odd">
										<th align="Center" colspan=4><FONT size="+1" Face="Times new roman" COLOR="#FF0099"><I>Sorry no Jobseekers found, please modify your search criteria and try again</I></FONT></th>
								  </tr><% }
			rs.close();
			stmt.close();
			con.close();
		}catch(Exception e){
			rs.close();
			stmt.close();
			con.close();
			%><%=e%><%
		}
	
%>
</Table>

<%
}else{

%><br><br><br><br><br><h3 align="center"><font color="red">You are not autherised person to register</font></h3>
<%
	}
%>
</body>